
<?php
//非composer安装 自动加载文件
spl_autoload_register(function ($class) {
    $class = ltrim($class, '\\');
    $prefix = 'PhpOffice\PhpWord';
    if (strpos($class, $prefix) === 0) {
        $class = str_replace('\\', DIRECTORY_SEPARATOR, $class);
        $class = implode(DIRECTORY_SEPARATOR, array('PhpWord')) . substr($class, strlen($prefix));
        $file = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php';
        if (file_exists($file)) {
            require_once $file;
        }
    }
});
//引用真实路径即可
require_once ROOT_D."/core/library/phpoffice/Common/Autoloader.php";
\PhpOffice\Common\Autoloader::register();

